package com.ase.leetcode;

import java.util.Arrays;
import java.util.Scanner;
import java.io.*;

/**
 * @author gyhstart
 * @create 2021/3/10 - 15:43
 * 数字颠倒
 **/
public class leetcode2 {
    public static void main(String[] args) throws IOException {
        InputStream stream = System.in;
        int l;
        byte[] bytes = new byte[1024];
        while((l = stream.read(bytes))>0){
            String numStr = new String(bytes, 0, l - 1);
            char [] numChars = numStr.toCharArray();
            char [] numCharsConvert = new char[numChars.length];
            for(int i =0; i < numChars.length; i++){
                numCharsConvert[i] = numChars[numChars.length-1-i];
            }
            System.out.println(new String (numCharsConvert));
        }

    }
}
